Text File | 1996-06-20 | 802 b | 10 lines | [TEXT/ttxt]
I wrote this test program after some alarming reports about CodeWarrior Pascal being slow.
The test tries to determine what method should be used for problems where you need to access memory fast, like when making image operation on a pixel-by-pixel basis or making operations on large arrays.
The test indicates that Think Pascal is significantly faster than CodeWarrior Pascal in a case like this. The reason is that CodeWarrior Pascal copies pointers between data and address registers when making pointer arithmetics. (PPC Pascal doesn't have this problem.)
My conclusion is: if you use Think Pascal, use pointer arithmetics by casting pointers to Longint and back. If you use CodeWarrior Pascal, use arrays instead. It is still slower than Think Pascal, but not *that* much slower.